<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>系统架构设计指南</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css">
    <link rel="stylesheet" href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            min-height: 100vh;
        }
        .hero-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        }
        .card-hover {
            transition: all 0.3s ease;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 40px rgba(0,0,0,0.1);
        }
        .text-gradient {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }
        .section-title::before {
            content: '';
            position: absolute;
            left: 0;
            bottom: -10px;
            width: 60px;
            height: 4px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 2px;
        }
        .drop-cap {
            float: left;
            font-size: 4rem;
            line-height: 1;
            font-weight: 700;
            margin-right: 0.5rem;
            color: #667eea;
            font-family: 'Noto Serif SC', serif;
        }
        .mermaid {
            background: white;
            border-radius: 12px;
            padding: 2rem;
            box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        }
        .icon-box {
            width: 60px;
            height: 60px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 12px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            font-size: 24px;
            margin-bottom: 1rem;
        }
        .list-item::before {
            content: '▸';
            color: #667eea;
            font-weight: bold;
            margin-right: 0.5rem;
        }
    </style>
</head>
<body>
    <!-- Hero Section -->
    <section class="hero-gradient text-white py-20">
        <div class="container mx-auto px-6">
            <div class="max-w-4xl mx-auto text-center">
                <h1 class="text-5xl md:text-6xl font-bold mb-6 leading-tight">
                    构建卓越的系统架构
                </h1>
                <p class="text-xl md:text-2xl mb-8 opacity-90">
                    从设计理念到实践落地，打造高效、可扩展、安全的现代化系统
                </p>
                <div class="flex justify-center space-x-4">
                    <div class="bg-white bg-opacity-20 rounded-lg px-6 py-3">
                        <i class="fas fa-layer-group mr-2"></i>
                        多层次架构
                    </div>
                    <div class="bg-white bg-opacity-20 rounded-lg px-6 py-3">
                        <i class="fas fa-shield-alt mr-2"></i>
                        安全可靠
                    </div>
                    <div class="bg-white bg-opacity-20 rounded-lg px-6 py-3">
                        <i class="fas fa-expand-arrows-alt mr-2"></i>
                        弹性扩展
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Introduction -->
    <section class="py-16 bg-white">
        <div class="container mx-auto px-6">
            <div class="max-w-4xl mx-auto">
                <p class="text-lg leading-relaxed text-gray-700">
                    <span class="drop-cap">项</span>目的系统架构通常包括多个层次和组件，每个部分负责特定的功能或任务。架构设计应考虑系统的扩展性、容错性、安全性、数据流以及部署和运维需求。一个完善的系统架构能够确保系统的高效运行，并应对不断增长的业务需求和技术挑战。
                </p>
            </div>
        </div>
    </section>

    <!-- Architecture Overview -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto px-6">
            <div class="max-w-6xl mx-auto">
                <h2 class="text-4xl font-bold mb-12 text-center relative inline-block section-title">
                    总体架构
                </h2>
                
                <!-- Architecture Diagram -->
                <div class="mb-12">
                    <div class="mermaid">
                        graph TB
                            subgraph "前端层"
                                A[用户界面] --> B[API通信]
                            end
                            subgraph "应用层"
                                C[业务逻辑] --> D[服务接口]
                                E[认证授权]
                            end
                            subgraph "数据层"
                                F[关系型数据库] 
                                G[NoSQL数据库]
                                H[缓存系统]
                            end
                            subgraph "基础设施层"
                                I[负载均衡]
                                J[容器编排]
                                K[监控日志]
                            end
                            B --> C
                            B --> E
                            C --> F
                            C --> G
                            C --> H
                            D --> I
                            I --> J
                            J --> K
                    </div>
                </div>

                <!-- Layer Cards -->
                <div class="grid md:grid-cols-2 gap-8 mb-12">
                    <div class="bg-white rounded-xl p-8 card-hover">
                        <div class="icon-box">
                            <i class="fas fa-layer-group"></i>
                        </div>
                        <h3 class="text-2xl font-bold mb-4">层次结构</h3>
                        <ul class="space-y-3 text-gray-700">
                            <li class="list-item"><strong>前端层：</strong>用户界面和用户体验相关的部分，通常使用现代前端框架如React、Vue.js或Angular</li>
                            <li class="list-item"><strong>应用层：</strong>处理业务逻辑的核心层，通常由后端服务组成</li>
                            <li class="list-item"><strong>数据层：</strong>数据存储和管理层，包括数据库和缓存系统</li>
                            <li class="list-item"><strong>服务层：</strong>包括微服务架构或传统服务接口，处理跨模块的业务逻辑</li>
                            <li class="list-item"><strong>基础设施层：</strong>包括服务器、网络配置、负载均衡和容器化技术</li>
                        </ul>
                    </div>

                    <div class="bg-white rounded-xl p-8 card-hover">
                        <div class="icon-box">
                            <i class="fas fa-code"></i>
                        </div>
                        <h3 class="text-2xl font-bold mb-4">技术栈</h3>
                        <div class="space-y-4">
                            <div>
                                <h4 class="font-semibold text-purple-600 mb-2">前端技术</h4>
                                <p class="text-gray-700">HTML, CSS, JavaScript, React/Vue/Angular, RESTful APIs</p>
                            </div>
                            <div>
                                <h4 class="font-semibold text-purple-600 mb-2">后端技术</h4>
                                <p class="text-gray-700">Java/Spring Boot, Node.js/Express, Python/Django</p>
                            </div>
                            <div>
                                <h4 class="font-semibold text-purple-600 mb-2">数据存储</h4>
                                <p class="text-gray-700">MySQL/PostgreSQL, MongoDB, Redis</p>
                            </div>
                            <div>
                                <h4 class="font-semibold text-purple-600 mb-2">基础设施</h4>
                                <p class="text-gray-700">Docker, Kubernetes, Jenkins, GitLab CI/CD</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Components Section -->
    <section class="py-16 bg-white">
        <div class="container mx-auto px-6">
            <div class="max-w-6xl mx-auto">
                <h2 class="text-4xl font-bold mb-12 text-center relative inline-block section-title">
                    组件组成
                </h2>

                <div class="grid md:grid-cols-3 gap-6 mb-12">
                    <div class="bg-gradient-to-br from-purple-50 to-indigo-50 rounded-xl p-6 card-hover">
                        <div class="text-3xl mb-4 text-purple-600">
                            <i class="fas fa-desktop"></i>
                        </div>
                        <h3 class="text-xl font-bold mb-3">前端组件</h3>
                        <ul class="space-y-2 text-gray-700">
                            <li>• 用户界面：负责呈现数据和处理用户交互</li>
                            <li>• API通信：与后端服务进行数据交换</li>
                        </ul>
                    </div>

                    <div class="bg-gradient-to-br from-blue-50 to-cyan-50 rounded-xl p-6 card-hover">
                        <div class="text-3xl mb-4 text-blue-600">
                            <i class="fas fa-server"></i>
                        </div>
                        <h3 class="text-xl font-bold mb-3">应用组件</h3>
                        <ul class="space-y-2 text-gray-700">
                            <li>• 业务逻辑层：实现具体的业务规则和操作</li>
                            <li>• 服务层：提供RESTful API或gRPC服务</li>
                            <li>• 认证和授权：处理用户身份验证和权限管理</li>
                        </ul>
                    </div>

                    <div class="bg-gradient-to-br from-green-50 to-emerald-50 rounded-xl p-6 card-hover">
                        <div class="text-3xl mb-4 text-green-600">
                            <i class="fas fa-database"></i>
                        </div>
                        <h3 class="text-xl font-bold mb-3">数据存储</h3>
                        <ul class="space-y-2 text-gray-700">
                            <li>• 关系型数据库：存储结构化数据</li>
                            <li>• 非关系型数据库：存储非结构化数据</li>
                            <li>• 缓存：加速数据访问，减轻数据库负担</li>
                        </ul>
                    </div>
                </div>

                <!-- Data Flow Visualization -->
                <div class="bg-gray-50 rounded-xl p-8 mb-12">
                    <h3 class="text-2xl font-bold mb-6 text-center">数据流向</h3>
                    <div class="mermaid">
                        sequenceDiagram
                            participant U as 用户
                            participant F as 前端界面
                            participant A as 应用层
                            participant S as 服务层
                            participant D as 数据库
                            
                            U->>F: 发起请求
                            F->>A: API调用
                            A->>S: 业务处理
                            S->>D: 数据读写
                            D-->>S: 返回数据
                            S-->>A: 处理结果
                            A-->>F: 响应数据
                            F-->>U: 展示结果
                    </div>
                </div>
            </div>
        </div>
    </section>

    <!-- Features Grid -->
    <section class="py-16 bg-gray-50">
        <div class="container mx-auto px-6">
            <div class="max-w-6xl mx-auto">
                <div class="grid md:grid-cols-2 gap-12">
                    <!-- Scalability -->
                    <div>
                        <h2 class="text-3xl font-bold mb-8 flex items-center">
                            <i class="fas fa-expand-arrows-alt mr-4 text-gradient"></i>
                            扩展性和容错性
                        </h2>
                        <div class="bg-white rounded-xl p-8 shadow-lg">
                            <div class="mb-6">
                                <h3 class="text-xl font-bold mb-3 text-purple-600">扩展性</h3>
                                <ul class="space-y-2 text-gray-700">
                                    <li class="list-item"><strong>水平扩展：</strong>通过增加服务器实例来处理更多的负载</li>
                                    <li class="list-item"><strong>微服务架构：</strong>通过拆分服务模块，使得每个服务可以独立扩展</li>
                                    <li class="list-item"><strong>容器化：</strong>利用容器技术实现服务的动态扩展和缩减</li>
                                </ul>
                            